<template>
  <div class="bg-#fff">
    <van-form label-position="left" label-width="110px" :model="form">
      <van-field v-model="form.truename" name="真实姓名" label="真实姓名" placeholder="请填写真实姓名" />

      <van-field v-if="forms.indexOf('wxh') >= 0" v-model="form.wxnumber" name="微信号" label="微信号" placeholder="请填写微信号">
        <template #button>
          <van-button v-if="showAddAdmin" size="small" type="default">{{ addAdminText }}</van-button>
        </template>
      </van-field>
      <van-field v-if="forms.indexOf('zfb') >= 0" v-model="form.zfb" name="支付宝账号" label="支付宝账号" placeholder="请填写支付宝账号" />
      <van-field v-if="forms.indexOf('wxskm') >= 0" name="uploader" label="微信收款码">
        <template #input>
          <van-uploader v-model="form.wxskm" />
        </template>
      </van-field>
      <van-field v-if="forms.indexOf('zfbskm') >= 0" name="uploader" label="支付宝收款码">
        <template #input>
          <van-uploader v-model="form.zbfskm" />
        </template>
      </van-field>
      <van-button type="primary" class="block w-90% ma" :color="buttonColor">{{ buttonText }}</van-button>
    </van-form>
  </div>
</template>

<script>
export default {
  name: 'DkAppWithdrawForm',
  props: {
    forms: {
      default: () => {
        return []
      },
      type: Array
    },
    buttonColor: { default: '#F64C2E', type: String },
    showAddAdmin: { default: false, type: Boolean },
    buttonText: { default: '提交', type: String },
    addAdminText: { default: '添加管理员', type: String }
  },
  data: () => {
    return {
      form: {}
    }
  }
}
</script>

<style scoped></style>
